package com.cmower.dzone.compareArrayAndCheckMismatches;

import java.util.Arrays;

/**
 * @author 沉默王二，一枚有趣的程序员
 */
public class EqualStringDemo {
    public static void main(String[] args) {
String[] str1 = {"沉", "默", "王", "二"};
String[] str2 = {"沉", "默", "王", "二"};
String[] str3 = {"沉", "默", "王", "三"};

System.out.println(Arrays.equals(str1, str2));
System.out.println(Arrays.equals(str1, str3));

        System.out.println(Arrays.equals(str1, 0, 3, str3, 0, 3));

        System.out.println(Arrays.mismatch(str1, str2));
        System.out.println(Arrays.mismatch(str1, str3));

    }
}
